﻿// <copyright file="TableStorageConstants.cs" company="N/A">
//     Copyright (c) Nicholas Barrett and Benjamin Kasten.  All rights reserved.
//
//     This program is free software; you can redistribute it and/or modify it
//     under the terms of the GNU General Public License as published by the
//     Free Software Foundation; either version 2 of the License, or (at your
//     option) any later version.
//
//     This program is distributed in the hope that it will be useful, but
//     WITHOUT ANY WARRANTY; without even the implied warranty of
//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
//     Public License for more details.
//
//     You should have received a copy of the GNU General Public License along
//     with this program; if not, write to the Free Software Foundation, 
//     Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// </copyright>

namespace BetterAzureTableStorage
{
    using System;

    /// <summary>
    /// Constants for Azure Table Storage.
    /// </summary>
    public class TableStorageConstants
    {
        /// <summary>
        /// The minimum supported datetime value
        /// </summary>
        public static readonly DateTime MinSupportedDateTime = new DateTime(1753, 1, 1, 0, 0, 0);

        /// <summary>
        /// Limit on the number of transactions that may be batched in a table storage request.
        /// </summary>
        public const int TransactionLimit = 100;

        /// <summary>
        /// Limit on the size of a batch request in table storage in bytes.
        /// </summary>
        /// <value>4mb</value>
        public const int TransactionSizeLimit = 4194304;

        /// <summary>
        /// Data service version 1.0
        /// </summary>
        public const string DataServiceVersion1 = "1.0;NetFx";

        /// <summary>
        /// Data service version 2.0
        /// </summary>
        public const string DataServiceVersion2 = "2.0;NetFx";

        /// <summary>
        /// The UTF-8 identifier string
        /// </summary>
        public const string UTF8 = "UTF-8";

        /// <summary>
        /// Version of operation for storage service methods
        /// </summary>
        public const string XMSVersion = "2009-09-19";

        /// <summary>
        /// UserAgent header for http requests
        /// </summary>
        public const string UserAgent = "Microsoft ADO.NET Data Services";

        /// <summary>
        /// Date time format
        /// </summary>
        public const string DateTimeFormat = "yyyy-MM-dd'T'HH:mm:ssZ";

        /// <summary>
        /// Field name for the discriminator
        /// </summary>
        public const string DiscriminatorFieldName = "Discriminator";

        /// <summary>
        /// The edm type of the discriminator as defined in xml
        /// </summary>
        public const string DiscriminatorFieldType = "Edm.Int32";
    }
}
